Bouncing Towers move faster than Hanoi Towers, but still require exponential time

نویسنده

  • Jérémy Barbay
چکیده

The problem of the Hanoï Tower is a classic exercise in recursive programming: the solution has a simple recursive definition, and its complexity and the matching lower bound are the solution of a simple recursive function (the solution is so easy that most students memorize it and regurgitate it at exams without truly understanding it). We describe how some very minor changes in the rules of the Hanoï Tower yield various increases of complexity in the solution, so that they require a deeper analysis than the classical Hanoï Tower problem while still yielding exponential solutions. In particular, we analyze the problem fo the Bouncing Tower, where just changing the insertion and extraction position from the top to the middle of the tower results in a surprising increase of complexity in the solution: such a tower of n disks can be optimally moved in √ 3 moves for n even (i.e. less than a Hanoï Tower of same height), via 5 recursive functions (or, equivalently, one recursion function with 5 states).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Selenite Towers Move Faster Than Hanoï Towers, But Still Require Exponential Time

The Hanoï Tower problem is a classic exercise in recursive programming: the solution has a simple recursive definition, and its complexity and the matching lower bound correspond to the solution of a simple recursive function (the solution is so simple that most students memorize it and regurgitate it at exams without truly understanding it). We describe how some minor change in the rules of th...

متن کامل

Twin Towers of Hanoi

In the Twin Towers of Hanoi version of the well known Towers of Hanoi Problem there are two coupled sets of pegs. In each move, one chooses a pair of pegs in one of the sets and performs the only possible legal transfer of a disk between the chosen pegs (the smallest disk from one of the pegs is moved to the other peg), but also, simultaneously, between the corresponding pair of pegs in the cou...

متن کامل

Solutions to the generalized Towers of Hanoi problem

The purpose of this paper is to prove the Frame-Stewart algorithm for the generalized Towers of Hanoi problem as well as finding the number of moves required to solve the problem and studying the multitude of optimal solutions. The main idea is to study how to most effectively move away all but the last disc and use the fact that the total number of moves required to solve the problem is twice ...

متن کامل

On the Towers of Hanoi problem

We analyze a solution to a variant of the Towers of Hanoi problem, in which multiple spare pegs are used to move the disks from the source to the destination peg. We also discuss the interesting relation between the number of disks and the total number of disk moves when the number of spare pegs is a function of number of disks.

متن کامل

A New Lower Bound for the Towers of Hanoi Problem

More than a century after its proposal, the Towers of Hanoi puzzle with 4 pegs was solved by Thierry Bousch in a breakthrough paper in 2014. The general problem with p pegs is still open, with the best lower bound on the minimum number of moves due to Chen and Shen. We use some of Bousch’s new ideas to obtain an asymptotic improvement on this bound for all p > 5.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1602.03934  شماره 

صفحات  -

تاریخ انتشار 2016